3.1.16 \(\int \frac {3-x+2 x^2}{2+3 x+5 x^2} \, dx\)

Optimal. Leaf size=42 \[ -\frac {11}{50} \log \left (5 x^2+3 x+2\right )+\frac {2 x}{5}+\frac {143 \tan ^{-1}\left (\frac {10 x+3}{\sqrt {31}}\right )}{25 \sqrt {31}} \]

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {1657, 634, 618, 204, 628} \begin {gather*} -\frac {11}{50} \log \left (5 x^2+3 x+2\right )+\frac {2 x}{5}+\frac {143 \tan ^{-1}\left (\frac {10 x+3}{\sqrt {31}}\right )}{25 \sqrt {31}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(3 - x + 2*x^2)/(2 + 3*x + 5*x^2),x]

[Out]

(2*x)/5 + (143*ArcTan[(3 + 10*x)/Sqrt[31]])/(25*Sqrt[31]) - (11*Log[2 + 3*x + 5*x^2])/50

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 1657

Int[(Pq_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x + c*x^2)^p, x
], x] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rubi steps

\begin {align*} \int \frac {3-x+2 x^2}{2+3 x+5 x^2} \, dx &=\int \left (\frac {2}{5}+\frac {11 (1-x)}{5 \left (2+3 x+5 x^2\right )}\right ) \, dx\\ &=\frac {2 x}{5}+\frac {11}{5} \int \frac {1-x}{2+3 x+5 x^2} \, dx\\ &=\frac {2 x}{5}-\frac {11}{50} \int \frac {3+10 x}{2+3 x+5 x^2} \, dx+\frac {143}{50} \int \frac {1}{2+3 x+5 x^2} \, dx\\ &=\frac {2 x}{5}-\frac {11}{50} \log \left (2+3 x+5 x^2\right )-\frac {143}{25} \operatorname {Subst}\left (\int \frac {1}{-31-x^2} \, dx,x,3+10 x\right )\\ &=\frac {2 x}{5}+\frac {143 \tan ^{-1}\left (\frac {3+10 x}{\sqrt {31}}\right )}{25 \sqrt {31}}-\frac {11}{50} \log \left (2+3 x+5 x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 42, normalized size = 1.00 \begin {gather*} -\frac {11}{50} \log \left (5 x^2+3 x+2\right )+\frac {2 x}{5}+\frac {143 \tan ^{-1}\left (\frac {10 x+3}{\sqrt {31}}\right )}{25 \sqrt {31}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(3 - x + 2*x^2)/(2 + 3*x + 5*x^2),x]

[Out]

(2*x)/5 + (143*ArcTan[(3 + 10*x)/Sqrt[31]])/(25*Sqrt[31]) - (11*Log[2 + 3*x + 5*x^2])/50

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {3-x+2 x^2}{2+3 x+5 x^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(3 - x + 2*x^2)/(2 + 3*x + 5*x^2),x]

[Out]

IntegrateAlgebraic[(3 - x + 2*x^2)/(2 + 3*x + 5*x^2), x]

________________________________________________________________________________________

fricas [A]  time = 0.39, size = 33, normalized size = 0.79 \begin {gather*} \frac {143}{775} \, \sqrt {31} \arctan \left (\frac {1}{31} \, \sqrt {31} {\left (10 \, x + 3\right )}\right ) + \frac {2}{5} \, x - \frac {11}{50} \, \log \left (5 \, x^{2} + 3 \, x + 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^2-x+3)/(5*x^2+3*x+2),x, algorithm="fricas")

[Out]

143/775*sqrt(31)*arctan(1/31*sqrt(31)*(10*x + 3)) + 2/5*x - 11/50*log(5*x^2 + 3*x + 2)

________________________________________________________________________________________

giac [A]  time = 0.18, size = 33, normalized size = 0.79 \begin {gather*} \frac {143}{775} \, \sqrt {31} \arctan \left (\frac {1}{31} \, \sqrt {31} {\left (10 \, x + 3\right )}\right ) + \frac {2}{5} \, x - \frac {11}{50} \, \log \left (5 \, x^{2} + 3 \, x + 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^2-x+3)/(5*x^2+3*x+2),x, algorithm="giac")

[Out]

143/775*sqrt(31)*arctan(1/31*sqrt(31)*(10*x + 3)) + 2/5*x - 11/50*log(5*x^2 + 3*x + 2)

________________________________________________________________________________________

maple [A]  time = 0.00, size = 34, normalized size = 0.81 \begin {gather*} \frac {2 x}{5}+\frac {143 \sqrt {31}\, \arctan \left (\frac {\left (10 x +3\right ) \sqrt {31}}{31}\right )}{775}-\frac {11 \ln \left (5 x^{2}+3 x +2\right )}{50} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*x^2-x+3)/(5*x^2+3*x+2),x)

[Out]

2/5*x-11/50*ln(5*x^2+3*x+2)+143/775*arctan(1/31*(3+10*x)*31^(1/2))*31^(1/2)

________________________________________________________________________________________

maxima [A]  time = 0.97, size = 33, normalized size = 0.79 \begin {gather*} \frac {143}{775} \, \sqrt {31} \arctan \left (\frac {1}{31} \, \sqrt {31} {\left (10 \, x + 3\right )}\right ) + \frac {2}{5} \, x - \frac {11}{50} \, \log \left (5 \, x^{2} + 3 \, x + 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x^2-x+3)/(5*x^2+3*x+2),x, algorithm="maxima")

[Out]

143/775*sqrt(31)*arctan(1/31*sqrt(31)*(10*x + 3)) + 2/5*x - 11/50*log(5*x^2 + 3*x + 2)

________________________________________________________________________________________

mupad [B]  time = 3.39, size = 35, normalized size = 0.83 \begin {gather*} \frac {2\,x}{5}-\frac {11\,\ln \left (5\,x^2+3\,x+2\right )}{50}+\frac {143\,\sqrt {31}\,\mathrm {atan}\left (\frac {10\,\sqrt {31}\,x}{31}+\frac {3\,\sqrt {31}}{31}\right )}{775} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*x^2 - x + 3)/(3*x + 5*x^2 + 2),x)

[Out]

(2*x)/5 - (11*log(3*x + 5*x^2 + 2))/50 + (143*31^(1/2)*atan((10*31^(1/2)*x)/31 + (3*31^(1/2))/31))/775

________________________________________________________________________________________

sympy [A]  time = 0.14, size = 49, normalized size = 1.17 \begin {gather*} \frac {2 x}{5} - \frac {11 \log {\left (x^{2} + \frac {3 x}{5} + \frac {2}{5} \right )}}{50} + \frac {143 \sqrt {31} \operatorname {atan}{\left (\frac {10 \sqrt {31} x}{31} + \frac {3 \sqrt {31}}{31} \right )}}{775} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x**2-x+3)/(5*x**2+3*x+2),x)

[Out]

2*x/5 - 11*log(x**2 + 3*x/5 + 2/5)/50 + 143*sqrt(31)*atan(10*sqrt(31)*x/31 + 3*sqrt(31)/31)/775

________________________________________________________________________________________